package cn.rkylin.oms.sysreturn.service;

import java.util.List;
import java.util.Set;

import cn.rkylin.oms.sysreturn.domain.SysReturn;
import cn.rkylin.oms.sysreturn.vo.SysReturnVO;

public interface ISysReturnService {
    /**
     * querySysReturnVOList:根据查询条件获取退货单列表. <br/>
     *
     * @author zhanghao
     * @param sysReturnVO
     * @return
     * @throws Exception
     */
    List<SysReturn> querySysReturnVOList(SysReturnVO sysReturnVO) throws Exception;

    /**
     * generateReturn:生成退货单及其明细. <br/>
     *
     * @author zhanghao
     * @param sysReturn
     * @throws Exception 
     */
    int generateReturn(SysReturnVO sysReturn) throws Exception;

    /**
     * updateSysReturn:更新退货单信息. <br/>
     *
     * @author zhanghao
     * @param param
     * @throws Exception 
     */
    int updateSysReturn(SysReturnVO param) throws Exception;

    /**
     * updateSysReturn4local:废弃三方仓退货单. <br/>
     *
     * @author zhanghao
     * @param param
     * @throws Exception 
     */
    int cancelSysReturn4Ext(SysReturnVO param) throws Exception;

    /**
     * cancelSysReturn4local:废弃本地仓退货单. <br/>
     *
     * @author zhanghao
     * @param param
     * @throws Exception 
     */
    int cancelSysReturn4Local(SysReturnVO param) throws Exception;

    /**
     * deleteReturnSkuByAutoReturnId:根据退货单ID删除退货单明细. <br/>
     *
     * @author zhanghao
     * @param returnId
     * @return 
     * @throws Exception 
     */
    int deleteReturnSkuByAutoReturnId(String returnId) throws Exception;

    /**
     * updateUnApproveSysReturn:将特定退货单状态设置为未审核. <br/>
     *
     * @author zhanghao
     * @param param
     * @return
     * @throws Exception 
     */
    int updateUnApproveSysReturn(SysReturnVO param) throws Exception;

    /**
     * querySysReturnVOListWithExtend 根据查询条件获取退货单列表
     * @author zhanghao
     * @param queryParam
     * @return
     * @throws Exception 
     */
    List<SysReturnVO> querySysReturnVOListWithExtend(SysReturnVO queryParam) throws Exception;

    /**
     * 通过来源ID获取系统退货单
     * @param sourceId
     * @return
     * @throws Exception
     */
    public List<SysReturn> selectSysReturnForSysOrder(String sourceId) throws Exception;

    /**
     * querySysReturnVOByRefundId 根据退款单获取退货单列表
     * @author zhanghao
     * @param refundId
     * @return
     * @throws Exception
     */
    List<SysReturnVO> querySysReturnVOByRefundId(String refundId) throws Exception;

    /**
     * 根据自动创建的退货单ID删除退货单明细.
     *
     * @throws Exception
     * @see cn.rkylin.oms.sysreturn.service.ISysReturnService#deleteReturnSkuByIdList(java.util.Set)
     */
    public int deleteReturnSkuByIdList(Set<String> returnSkuIdList) throws Exception;

}

